export enum Gender {
	Male,
	Female,
}

export function parseGender(gender: string | boolean | Gender): Gender {
	if (typeof gender === "string") {
		if (
			gender.includes("男") ||
			gender.toUpperCase().includes("M") ||
			gender.toUpperCase().includes("B")
		) {
			return Gender.Male;
		}

		return Gender.Female;
	} else if (typeof gender === "boolean") {
		return gender ? Gender.Female : Gender.Male;
	} else {
		return gender;
	}
}
